package com.tx.spring_security.spring_security_demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 *
 */
@RequestMapping("/mercury")
@Controller
public class LogoutController {

    @RequestMapping(value = "/logout",method = RequestMethod.POST)
    public String logout(Model model){
        model.addAttribute("msg","退出登录成功");
        return "index";
    }

    @RequestMapping("/index")
    public String logoutIndex(Model model){
        model.addAttribute("msg","退出登录成功，跳转到了退出主页噜");
        return "logoutIndex";
    }

}